package com.vogue.supplymall.shop.common;

import com.vogue.supplymall.common.domain.dto.RelevanceInfo;

/**
 * The type Check relevance utils.
 * 关注、收藏的共通check
 *
 * @aouthor: zhangliang
 * @date: Create in 2018-03-28
 */
public class CheckRelevanceUtils {

    /**
     * Check param empty boolean.
     * 共通的参数check
     *
     * @param relevanceInfo the relevance info
     * @return the boolean
     */
    public static Boolean checkParamEmpty(RelevanceInfo relevanceInfo) {
        return null == relevanceInfo.getType() ||
                null == relevanceInfo.getTargetName() ||
                null == relevanceInfo.getTargetObjId();
    }

    /**
     * Check product watch param boolean.
     *
     * @param relevanceInfo the relevance info
     * @return the boolean
     */
    public static Boolean checkProductWatchParam(RelevanceInfo relevanceInfo) {
        return null == relevanceInfo.getType() ||
                null == relevanceInfo.getTargetObjType();
    }
}
